package com.ushine.mybatisplus.emp.model;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ushine.mybatisplus.dept.model.Dept;
import lombok.*;

import java.util.Date;

@Getter()
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("t_emp")
public class Emp {

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField(value = "name")
    private String name;

    @TableField(value = "salary")
    private Integer salary;

    @TableField(value = "entry_time")
    private Date entryTime;

    @TableField(value = "dept_id")
    private Integer deptId;

    @TableField(exist = false)
    private Dept dept;

}
